﻿using PBO.Data.SQLite.DAL;
using PBO.Data.Util;
using System;
using System.Linq;

namespace PBO.Data.Rnd
{
    public static class RandomData
    {
        public static TeamData GetSmogonTeam(Random random)
        {
            var team = new TeamData();
            var ids = DALRandomTeam.GetRndPmId().GetRandom(random, 6).ToArray();
            for (int i = 0; i < ids.Length; i++)
            {
                var pid = DALRandomTeam.GetPids(ids[i]).GetRandom(random);
                team.Pokemons[i] = DALRandomTeam.GetSmogonPm(pid, random);
            }
            team.Validate();
            return team;
        }

        public static PokemonCustomInfo GetSmogonPm(Random random, int pid)
        {
            return DALRandomTeam.GetSmogonPm(pid, random);
        }
    }
}